package com.maywide.jdp.system.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.maywide.jdp.system.entities.Menu;
import com.maywide.jdp.system.vo.MenuVO;

/**
 * 菜单管理Service接口
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 */
public interface MenuService extends LockedService, MovedService {

	/**
	 * 新增菜单
	 * 
	 * @param menu
	 *            菜单对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Menu 新增后的对象
	 */
	public Menu insert(Menu menu,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 修改菜单
	 * 
	 * @param menuVO
	 *            菜单对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Menu 修改后的对象
	 */
	public Menu update(Menu menuVO,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 应用修改菜单
	 * 
	 * @param menuVO
	 *            菜单对象
	 * @param appType 应用类型
	 * @param request
	 *            HttpServletRequest对象
	 * @return Menu 修改后的对象
	 */
	public Menu updateApp(Menu menuVO,String appType,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 读取菜单
	 * 
	 * @param id
	 *            菜单ID
	 * @param request
	 *            HttpServletRequest对象
	 * @return Menu 读取的菜单对象
	 */
	public Menu load(String id, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 获得某个登录用户的启动菜单
	 * @param context 登录上下文
	 * @return 菜单VO列表
	 */
	public List<MenuVO> getStartMenus(HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;
}
